<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AlterTableWorkOrderApplyMainAddMerchantConfirm extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('work_order_apply_main', function (Blueprint $table) {
            $table->unsignedTinyInteger("merchantConfirmFinishStatus")->comment("商家确认状态 0 - 待确认 1 - 已确认完成")->default(0)
                  ->after("extra");
            $table->unsignedInteger("merchantConfirmFinishTime")->comment("商家确认时间")->default("0")->after("extra");
            $table->unsignedTinyInteger("merchantConfirmFinishType")->comment("商家确认完成类型 1 - 系统 1 - 商家主动确认")->default(0)
                  ->after("extra");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('work_order_apply_main', function (Blueprint $table) {
            $table->dropColumn([
                "merchantConfirmFinishStatus",
                "merchantConfirmFinishTime",
                "merchantConfirmFinishType"
            ]);
        });
    }
}
